﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PacMan
{
    public partial class NewPlayerForm : Form
    {
        public NewPlayerForm()
        {
            InitializeComponent();
        }

        private void OKButton_Click(object sender, EventArgs e)
        {
            if (playerName.Text != "")
            {
                Environment.PlayerName = playerName.Text;
                GameForm newGame = new GameForm();
                newGame.Show();
                this.Dispose();
            }
            else
            {
                MessageBox.Show("You should enter player name!");
            }
        }
    }
}
